@import "common";
/* 点击高亮需要清除，设置为transparent变成透明 */
*{
    -webkit-tap-highlight-color: transparent;
}
/* 在移动端浏览器默认的外观在IOS上加上这个属性才能给按钮和输入框自定义样式 */
input{
    -webkit-appearance: none;
}
/* 禁用长按页面时的弹出菜单 */
img,a{-webkit-touch-callout: none;}
/* 给body进行样式初始化（注意！制作过程中，在这一步，需要定义页面的最大和最小支持宽度max-width、min-width。） */
body {
    min-width: 320px;
    max-width: 15rem;
    // 都等于设备宽度
    margin: 0 auto;
    background-color:#f2f2f2;
    line-height: 1.5;
    font-family: Arial,Helvetica,STHeiTi,sans-serif;
}
a {
    text-decoration: none;
}
ul,ol {
    list-style: none;
    padding: 0;
}
img {
    max-width: 100%;
    max-height: 100%;
}
@baseFont: 50px;
// top-banner
.top-banner {
    position: relative;
    width: 750rem / @baseFont;
    height: 100rem / @baseFont;
    .top-banner-img {
        display: block;
        width: 100%;
        height: 100%;
        img {
            width: 100%;
            height: 100%;
        }
    }
    .close {
        position: absolute;
        top: 0.5rem;
        left: 0.1rem;
        width: 50rem / @baseFont;
        height: 50rem / @baseFont;
        background: url(../images/close.png) no-repeat center center;
        background-size: 30rem / @baseFont;
    }
}
// header 
.header {
    width: 750rem / @baseFont;
    height: 180rem / @baseFont;
    background-color: #FFDB47;
    img {
        max-width: 100%;
    }
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 682rem / @baseFont;
        height: 88rem / @baseFont;
        padding: 0 34rem / @baseFont;
         a:nth-child(1) {
            img {
                display: block;
                width: 36rem / @baseFont;
                height: 60rem / @baseFont;
            }
        }
        a:nth-child(2) {
            img {
                display: block;
                width: 450rem / @baseFont;
                height: 55rem / @baseFont;
                margin-right: 50rem / @baseFont;
            }
        }
        a:nth-child(3){
            img {
                display: block;
                width: 36rem / @baseFont;
                height: 60rem / @baseFont;
            }
        }
    }
    .search {
        position: relative;
        width: 750rem / @baseFont;
        height: 92rem / @baseFont;
        padding: 0 24rem / @baseFont; 
        box-sizing: border-box;
        a {
            position: absolute;
            width: 702rem / @baseFont;
            height: 88rem / @baseFont;
        }
        i {
            position: absolute;
            top: 52rem / (2*@baseFont);
            left: 42rem / @baseFont;
            width: 36rem / @baseFont;
            height: 36rem / @baseFont;
            background: url(../images/search_btn.png) no-repeat 0 0;
            background-size: 36rem / @baseFont;
            // box-sizing别忘了
        }
        form {
            display: flex;
            align-items: center;
            width: 702rem / @baseFont;
            height: 88rem / @baseFont;
            input {
                padding: 3rem / @baseFont 20rem / @baseFont 0 65rem / @baseFont;
                border: 0;
                box-sizing: border-box;
                border-radius: 44rem / @baseFont;
            }
        }
    }
}
// banner 
.banner {
    width: 750rem / @baseFont;
    height: 260rem / @baseFont;
    background: url(../images/banner_bg.png) no-repeat 0 0 ;
    background-size: 750rem / @baseFont;
    .wrapper {
        position: relative;
        width: 702rem / @baseFont;
        height: 260rem / @baseFont;
        margin: 0 auto;
        overflow: hidden;
    }
}
.banner .wrapper ul {
    position: relative;
    width: 1500rem / @baseFont;
    height: 260rem / @baseFont;
    margin: 0;
    li {
        position: absolute;
        top: 0;
        left: 702rem / @baseFont;
        width: 702rem / @baseFont;
        height: 260rem / @baseFont;
        border-radius: 24rem / @baseFont;
        overflow: hidden;
        // overflow: hidden;才有图片的圆角 
        &.current {
            left: 0;
        }
        img {
            width: 702rem / @baseFont;
            height: 260rem / @baseFont;
        }
    }
}
.banner .wrapper ol {
    margin: 0;
    position: absolute;
    left: 50%;
    bottom: 0.24rem;
    height: 0.16em;
    text-align: center;
    transform: translate(-50%);
    li {
        float: left;
        width: .18rem;
        height: .16rem;
        margin: 0 0.08rem;
        border-radius: 0.08rem;
        background-color: #666;
        &.current {
            width: 0.36rem;
            background-color: #fff;
        }
    }
}
// nav 
nav {
    display: flex;
    flex-wrap: wrap;
    width: 750rem / @baseFont;
    height: 308rem / @baseFont;
    a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 20%;
        height: 142rem / 50;
        text-decoration: none;
        color: #666;
    }
    & a:nth-child(n+6){
        justify-content: start;
    }
    img {
        width: 84rem / @baseFont;
        height: 84rem / @baseFont;
    }
    p {
        margin: 5rem / 50px 0 0;
        font-size: 0.44rem;
        line-height: 0.44rem;
    }
}
// .discount
.discount {
    display: flex;
    width: 14.04rem;
    height: 5.16rem;
    margin: 0 auto;
    border-radius: 0.24rem 0.24rem 0 0;
    overflow: hidden;
    font-size: .16rem;
    background-color: #fff;
    .left {
        position: relative;
        width: 7rem;
        height: 5.16rem;
        border-right: 1px solid #f2f2f2;
        .title-wrapper {
            display: flex;
            align-items: flex-end;
        }
        p {
            width: 6rem;
            height: 0.6rem;
            margin: 0.08rem 0 0 0.48rem;
            color: #999;
            font-size: 0.48rem;
        }
    }
    .right {
        float: left;
        width: 7rem;
        height: 5.16rem;
        .title-wrapper {
            display: flex;
            align-items: flex-end;
        }
        p {
            width: 6rem;
            height: 0.6rem;
            margin: 0.08rem 0 0 0.48rem;
            color: #999;
            font-size: 0.48rem;
        }
    }
}

.discount .left .title-wrapper .title, .discount .right .title-wrapper .title{
    height: 0.8rem;
    margin: 0.36rem 0.16rem 0 0.48rem;
    font-size: 0.56rem;
    font-weight: bold;
    line-height: 0.8rem;
    color: #333;
}
.discount .left .title-wrapper .count span, .discount .right .title-wrapper .count span{
    width: .226667rem;
    height: .186667rem;
    border-radius: 2px;
    background-color: #FFCC00;
    font-size: .16rem;
    font-weight: bold;
    line-height: 0.7rem;
    color: black;
}
.discount .left .items, .discount .right .items{
    display: flex;
    width: 7rem;
    margin-top: 0.1rem;
    padding-left: 0.56rem;
    li {
        width: 2.4rem;
        &.item-left {
            margin-right: 1.1rem;
        }
        a {
            display: block;
            img {
                max-width: 100%;
            }
            p {
                position: relative;
                bottom: .066667rem;
                width: 60px;
                height: 0.56rem;
                margin: 0;
                padding: 0;
                font-size: 0.44rem;
                line-height: 0.56rem;
                text-align: center;
                color: red;
            }
        }
    }
}
.discount .right .items li a p {
    color: black;
}
// bd 
.bd {
    .cut-line {
        width: 15rem;
        height: 1.2rem;
        a{
            display: block;
            height: 1.2rem;
        }
    }
    .bd-list {
        width: 15rem;
        .bd-three{
            display: flex;
            justify-content: space-between;
            width: 14.04rem;
            margin:0 auto 0.26rem;
        }
        .bd-two {
            display: flex;
            width: 14.04rem; 
            margin: 0 auto;
            border-bottom: 1px solid #f2f2f2;
        }
    }
}
.bd .bd-list .bd-three .item{
    position: relative;
    width: 4.52rem;
    height: 5.32rem;
    border-radius: 0.24rem;
    background-color: #fff;
    a {
        display: block;
        img:nth-child(1) {
            display: block;
            width: 3rem;
            height: 3rem;
            margin: 0.3rem auto 0;
        }
        img:nth-child(2){
            position: absolute;
            bottom: 0;
            width: 4.52rem;
            height: 1.86rem;
        }
        p {
            margin: 0;
            position: relative;
            font-size: 0.44rem;
            color: white;
            text-align: center;
            width: 100%;
        }
        p:nth-child(3){
            position: absolute;
            top: 3.16rem;
            span {
                display: block;
                height: 0.68rem;
                font-size: 0.44rem;
                width: 2rem;
                margin: 0 auto;
                border-radius: 0.34rem;
                text-align: center;
                color: #d9a87a;
                background-color: #fff;
            }
        }
        p:nth-child(4){
            margin: 0.62rem auto 0.06rem;
        }
    }
}
.bd-two .left .title-wrapper .count span, .bd-two .right .title-wrapper .count span {
    height: 0.56rem;
    background-color: #F9F5EE;
    color: #AB813A;
}